<template>
<van-skeleton title :row="3" />
    <div>
<van-nav-bar
  title="标题"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
  fixed
/>
<div style="height: 45px;"></div>
<van-row v-for="item in categoriesApiData">
  <van-col span="6">
    <van-sidebar v-model="active" >
  <van-sidebar-item :title="item.cat_name" v-for="item in categoriesApiData[0]?.children"/>
</van-sidebar>
  </van-col>
  <van-col span="18">
    <van-grid :column-num="3">
        <h3>{{ item.cat_name }}</h3>
  <van-grid-item v-for="items in item.children" :key="value" :icon="items.cat_icon" :text="items.cat_name" />
</van-grid>
  </van-col>
</van-row>
    </div>
</template>

<script setup>
import { ref } from "vue";
import { categoriesApi } from "@/api/api";
let categoriesApiData=ref([])
  const active = ref(1);
categoriesApi().then(res=>{
    categoriesApiData.value=res.data.message
    console.log('分类',res.data.message);
})

</script>

<style lang="scss" scoped>

</style>